#!/usr/bin/env python

from Tools.MuProcess import MuProcess
from Tools.Hdfstools import Hdfstools
import os

user = "hdfs"
cluster1 = "172.17.128.1:9870"
cluster2 = "172.17.250.1:9870,172.17.250.2:9870"
nn1 = "hdfs://172.17.128.1:9820"
nn2 = "hdfs://172.17.250.1:9820"

hdfsdir = "/datascience/data/data-writer/adt/postman"

# 1T = 1024 ** 4 = 1099511627776
# 200G = 1024 ** 3 * 200=214748364800
minsize = ( 1024 ** 3 ) * 200
#sortfile = "taga.list"
run = Hdfstools(cluster1,hdfsdir,user,minsize)
run.sort_by_value()
#run.shell_distcp()
#run.shell_distcp()
#start = MuProcess(3,nn1,nn2,sortfile)
#start.rundistcp()
